package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.UserRoleMapper;
import cn.csdj.sism.pojo.UserRole;
import cn.csdj.sism.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleMapper userRoleMapper;
    @Override
    public int insert(UserRole userRole) {
        return userRoleMapper.insert(userRole);
    }

    @Override
    public int deleteById(Integer id) {
        return userRoleMapper.deleteById(id);
    }

    @Override
    public int update(UserRole userRole) {
        return userRoleMapper.updateById(userRole);
    }

    @Override
    public UserRole selectById(Integer id) {
        return userRoleMapper.selectById(id);
    }

    @Override
    public List<UserRole> selectAll() {
        return userRoleMapper.selectList(null);
    }
}
